//
//  BIZSynchronousTutorialHomeCell.m
//  biz
//
//  Created by LXL on 2017/7/6.
//  Copyright © 2017年 jieshuibao. All rights reserved.
//

#import "BIZSynchronousTutorialHomeCell.h"
#import "BIZSynchronousTutorialModel.h"

@interface BIZSynchronousTutorialHomeCell()
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *dateLabel;

@end

@implementation BIZSynchronousTutorialHomeCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapTitleContentLabelGesture)];
    //设置点击次数和点击手指数
    tapGesture.numberOfTapsRequired = 1; //点击次数
    tapGesture.numberOfTouchesRequired = 1; //点击手指数
    [self.titleLabel addGestureRecognizer:tapGesture];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (IBAction)synchronousAnalysisBtnClick {
    if (self.sychronousAnalysisVideoDetailBlock) {
        self.sychronousAnalysisVideoDetailBlock();
    }
}

- (void)tapTitleContentLabelGesture {
    if (self.sychronousAnalysisWordDetailBlock) {
        self.sychronousAnalysisWordDetailBlock();
    }
}


-(void)setSynchronousTutorialModel:(BIZSynchronousTutorialModel *)synchronousTutorialModel {
    _synchronousTutorialModel = synchronousTutorialModel;
    self.titleLabel.text = synchronousTutorialModel.title;
    self.dateLabel.text = [NSDate stringFromTimestamp:synchronousTutorialModel.createDate];
}

@end
